﻿@model MyWorkBlogMVC.Models.EditUserPostContentModel

@{
    ViewBag.Title = "EditPost";
}

@Styles.Render("~/Content/css")

<link href="~/Content/UserPages.css" rel="stylesheet" />
<div class="jumbotron">
    <img src="~/Content/blogme.PNG" />
</div>

<div class="title"><h2>Edit blogpost</h2></div>
<br />
<div class="body_wrapper">
    <div class="content">

        @using (Html.BeginForm("Editpost", "User"))
        {
            @Html.AntiForgeryToken()

            <div class="form-horizontal">
                <div class="form-group">
                    @Html.LabelFor(model => model.PostTitle, new { @class = "control-label col-md-2" })
                    <div class="col-md-10">
                        @Html.TextBoxFor(model => model.PostTitle)
                        @Html.ValidationMessageFor(model => model.PostTitle)
                    </div>
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.PostContent, new { @class = "control-label col-md-2" })
                    <div class="blogpost_info">
                        @Html.TextAreaFor(model => model.PostContent)
                        @Html.ValidationMessageFor(model => model.PostContent)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" value="Save" class="btn btn-default" />
                    </div>
                </div>
            </div>
        }

        <div>
            @Html.ActionLink("Back to List", "DeletePost", new { id = Model.BlogPostId })
        </div>
    </div>
</div>

